
#include <stdio.h>
#include <conio.h>
int func(int a, int b)
{
  int c;
  c = a - (a / b) * b;
  while (c!=0)
  {
   a = b;
   b = c;
   c = a - (a / b) * b;
  }
  return b;
}

int main()
{
  int a = 24948;
  int b = 72072;
  printf("%d %d %d\n", a, b, func(a, b));
  _getch();
  return 0;
}
